project(dialogModule LANGUAGES CXX)

# 启用自动处理
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

file(GLOB SRCS "*.cpp")
file(GLOB UIS "*.ui")
file(GLOB HEADERS "*.h")

foreach(cppfile IN LISTS SRCS)
	message(STATUS "add file:${cppfile} to ${PROJECT_NAME}")
endforeach()

# list(APPEND CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR})


add_library(${PROJECT_NAME} STATIC ${UIS} ${SRCS})

target_include_directories(${PROJECT_NAME}
    PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}/
        "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_autogen/include"
        ${jsoncpp_SOURCE_DIR}/include/
)

target_link_libraries(${PROJECT_NAME}
    PUBLIC
        Qt::Core
        Qt::Gui
        Qt::Widgets
        Qt::Network
        jsoncpp_lib
)

